import Vue from "vue";

// virtual dom => real dom
export function mountComponent(vnode, object = {}) {
  function $mountComponent(vnode) {
    const vm = new Vue({
      render: (h) => h(vnode, object),
    });

    vm.$mount();

    return vm;
  }
  return $mountComponent(vnode);
}
